package cn.buk.tms.entity.misc;

import cn.buk.tms.entity.base.BaseInfo;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.UniqueConstraint;

/**
 * 企业微信的群聊信息
 *
 * @author yfdai
 */
@Entity
@Table(name = "tms_ww_app_chat", uniqueConstraints = @UniqueConstraint(
        name = "uk_tms_ww_app_chat",
        columnNames = {"enterprise_id", "chat_id"}
))
public class TmsWwAppChat extends BaseInfo {

  /**
   * 群聊名，最多50个utf8字符，超过将截断
   */
  @Column(length = 50)
  private String name;

  /**
   * 群聊的唯一标志，不能与已有的群重复；字符串类型，最长32个字符。只允许字符0-9及字母a-zA-Z。如果不填，系统会随机生成群id
   */
  @Column(name = "chat_id", length = 32, nullable = false)
  private String chatId;

  /**
   * 群聊类型，便于处于重复使用该群聊发送同类信息
   */
  @Column(name = "chat_type", length = 10)
  private String chatType;


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getChatId() {
    return chatId;
  }

  public void setChatId(String chatId) {
    this.chatId = chatId;
  }

  public String getChatType() {
    return chatType;
  }

  public void setChatType(String chatType) {
    this.chatType = chatType;
  }
}
